package persistence.sale;
public class SalePersistFactory {

    public static SaleDAO getSaleDAO(String persistenceMechanism){
        if (persistenceMechanism.equals("file")){
            return SaleDAOFile.getJDBCPersistenceManager();
        }
        else if  (persistenceMechanism.equals("JDBC")){
            return SaleDAOJDBC.getJDBCPersistenceManager();
        }
        else if  (persistenceMechanism.equals("pool")){
            return SaleDAOPool.getSaleDAOPoolImplementation();
        }
        else{
            return null;
        }
    }
}
